package com.study.demo01.consumer;

import com.rabbitmq.client.Channel;
import com.study.demo01.config.ConfirmConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class WaringConsumer {
    @RabbitListener(queues = ConfirmConfig.waring_queue)
    public void receiveConfirmMessage(Message message, Channel channel) {
        log.info("报警发现不可路由消息[{}]", new String(message.getBody()));
    }
}
